package com.wwwarehouse.taskcenter.interfaces;

import java.io.InputStream;
import java.util.List;

/**
 * Created by clannad.shao on 2017/11/15.
 * Description:
 */

public interface XmlParse<T> {
    /**
     * 解析输入流 得到Book对象集合
     * @param is
     * @return
     * @throws Exception
     */
    List<T> parse(InputStream is) throws Exception;

    /**
     * 序列化Book对象集合 得到XML形式的字符串
     * @param objs
     * @return
     * @throws Exception
     */
    String serialize(List<T> objs) throws Exception;
}
